#ifndef DRIVER_H
#define DRIVER_H
#include<bits/stdc++.h>
struct node;
struct driver;
typedef int (*analyzer)(driver*);
struct driver{
  driver* myDriver;
  std::vector<analyzer> cal;
  std::vector<analyzer> op;
  std::vector<analyzer> end;
  driver();
  ~driver(){}
  driver(driver* myDriver);
  virtual node*getNode();
  virtual void addcal(std::initializer_list<analyzer> li);
  virtual void addop(std::initializer_list<analyzer> li);
  virtual void addexit(std::initializer_list<analyzer> li);
  virtual int  calculate();
  virtual int  exec();
  virtual int  exit();
};

driver* getDriver(node* drive);
void myParser();
#endif 
